Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use buble to prohibit ES6 code ending up in turf.min.js #2236

Closed
wants to merge 1 commit into from

Conversation

JamesLMilner
Copy link
Collaborator

So I've been thinking about #2191 #2200 more extensively and realised the underlying problem is that as it stands we can't upgrade rbush to the latest version (and in turn concaveman which relies on it) directly because it is now an ES6 module. As more of the Node ecosystem moves to using ES6 this will become more and more common place and we can't keep relying on external deps (and there deps) to be written in ES5.

I was attempting in #2225 to skirt around this by trying to use the ES5 export in rbush, but ultimately we can't do the same for concaveman because it uses the latest version of rbush, which eventually ends up in turf.min.js.

Here I was thinking we could run buble a minimal ES2015+ transpiler over the code that goes into turf.min.js to allow us to use any dependency we want inside our packages. Here I've bumped concaveman and rbush and you can see no ES6 code ends up in turf.min.js because it gets transpiled (this wouldn't be possible without buble).

What do you folks think?

@JamesLMilner
Copy link
Collaborator Author

Closing in favour of #2237

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant